/*
 Navicat Premium Data Transfer

 Source Server         : LocalDB
 Source Server Type    : SQL Server
 Source Server Version : 15004153
 Source Host           : (localdb)\MSSQLLocalDB:1433
 Source Catalog        : OcelotSettings
 Source Schema         : dbo

 Target Server Type    : SQL Server
 Target Server Version : 15004153
 File Encoding         : 65001

 Date: 07/07/2023 17:30:41
*/


-- ----------------------------
-- Table structure for GlobalConfiguration
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[GlobalConfiguration]') AND type IN ('U'))
	DROP TABLE [dbo].[GlobalConfiguration]
GO

CREATE TABLE [dbo].[GlobalConfiguration] (
  [Id] int  IDENTITY(1,1) NOT NULL,
  [BaseUrl] nvarchar(300) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [RequestIdKey] nvarchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [DownstreamScheme] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [DownstreamHttpVersion] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [LoadBalancer_Type] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [LoadBalancer_Key] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [LoadBalancer_Expiry] int  NULL,
  [HttpHandler_AllowAutoRedirect] bit  NULL,
  [HttpHandler_UseCookieContainer] bit  NULL,
  [HttpHandler_UseTracing] bit  NULL,
  [HttpHandler_UseProxy] bit  NULL,
  [HttpHandler_MaxConnectionsPerServer] int  NULL,
  [QosEnabled] bit  NULL,
  [Qos_ExceptionsAllowedBeforeBreaking] int  NULL,
  [Qos_DurationOfBreak] int  NULL,
  [Qos_TimeoutValue] int  NULL,
  [RateLimit_ClientIdHeader] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [RateLimit_QuotaExceededMessage] nvarchar(200) COLLATE Chinese_PRC_CI_AS  NULL,
  [RateLimit_RateLimitCounterPrefix] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [RateLimit_DisableRateLimitHeaders] bit  NULL,
  [RateLimit_HttpStatusCode] int  NULL,
  [ServiceDiscovery_Scheme] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [ServiceDiscovery_Host] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [ServiceDiscovery_Port] int  NULL,
  [ServiceDiscovery_Type] nvarchar(50) COLLATE Chinese_PRC_CI_AS  NULL,
  [ServiceDiscovery_Token] nvarchar(200) COLLATE Chinese_PRC_CI_AS  NULL,
  [ServiceDiscovery_ConfigurationKey] nvarchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [ServiceDiscovery_PollingInterval] int  NULL,
  [ServiceDiscovery_Namespace] nvarchar(100) COLLATE Chinese_PRC_CI_AS  NULL,
  [ServiceDiscoveryEnabled] bit  NULL,
  [Enabled] bit DEFAULT 0 NOT NULL
)
GO

ALTER TABLE [dbo].[GlobalConfiguration] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'主键Id',
'SCHEMA', N'dbo',
'TABLE', N'GlobalConfiguration',
'COLUMN', N'Id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'基础地址',
'SCHEMA', N'dbo',
'TABLE', N'GlobalConfiguration',
'COLUMN', N'BaseUrl'
GO

EXEC sp_addextendedproperty
'MS_Description', N'请求ID',
'SCHEMA', N'dbo',
'TABLE', N'GlobalConfiguration',
'COLUMN', N'RequestIdKey'
GO

EXEC sp_addextendedproperty
'MS_Description', N'Http协议（http,https）',
'SCHEMA', N'dbo',
'TABLE', N'GlobalConfiguration',
'COLUMN', N'DownstreamScheme'
GO

EXEC sp_addextendedproperty
'MS_Description', N'Http版本（1.0，1.1，2.0）',
'SCHEMA', N'dbo',
'TABLE', N'GlobalConfiguration',
'COLUMN', N'DownstreamHttpVersion'
GO

EXEC sp_addextendedproperty
'MS_Description', N'负载均衡方式（LeastConnection，RoundRobin，NoLoadBalance）',
'SCHEMA', N'dbo',
'TABLE', N'GlobalConfiguration',
'COLUMN', N'LoadBalancer_Type'
GO

EXEC sp_addextendedproperty
'MS_Description', N'负载均衡关键字',
'SCHEMA', N'dbo',
'TABLE', N'GlobalConfiguration',
'COLUMN', N'LoadBalancer_Key'
GO

EXEC sp_addextendedproperty
'MS_Description', N'负载均衡结束时间（ms）',
'SCHEMA', N'dbo',
'TABLE', N'GlobalConfiguration',
'COLUMN', N'LoadBalancer_Expiry'
GO

EXEC sp_addextendedproperty
'MS_Description', N'允许自定重定向',
'SCHEMA', N'dbo',
'TABLE', N'GlobalConfiguration',
'COLUMN', N'HttpHandler_AllowAutoRedirect'
GO

EXEC sp_addextendedproperty
'MS_Description', N'使用Cookie容器',
'SCHEMA', N'dbo',
'TABLE', N'GlobalConfiguration',
'COLUMN', N'HttpHandler_UseCookieContainer'
GO

EXEC sp_addextendedproperty
'MS_Description', N'使用追踪',
'SCHEMA', N'dbo',
'TABLE', N'GlobalConfiguration',
'COLUMN', N'HttpHandler_UseTracing'
GO

EXEC sp_addextendedproperty
'MS_Description', N'使用代理',
'SCHEMA', N'dbo',
'TABLE', N'GlobalConfiguration',
'COLUMN', N'HttpHandler_UseProxy'
GO

EXEC sp_addextendedproperty
'MS_Description', N' ',
'SCHEMA', N'dbo',
'TABLE', N'GlobalConfiguration',
'COLUMN', N'HttpHandler_MaxConnectionsPerServer'
GO

EXEC sp_addextendedproperty
'MS_Description', N'流量调控开启',
'SCHEMA', N'dbo',
'TABLE', N'GlobalConfiguration',
'COLUMN', N'QosEnabled'
GO

EXEC sp_addextendedproperty
'MS_Description', N'打开断路器之前允许的例外数量',
'SCHEMA', N'dbo',
'TABLE', N'GlobalConfiguration',
'COLUMN', N'Qos_ExceptionsAllowedBeforeBreaking'
GO

EXEC sp_addextendedproperty
'MS_Description', N'断路器复位之前打开的时间（ms）',
'SCHEMA', N'dbo',
'TABLE', N'GlobalConfiguration',
'COLUMN', N'Qos_DurationOfBreak'
GO

EXEC sp_addextendedproperty
'MS_Description', N'请求超时时间（ms）',
'SCHEMA', N'dbo',
'TABLE', N'GlobalConfiguration',
'COLUMN', N'Qos_TimeoutValue'
GO

EXEC sp_addextendedproperty
'MS_Description', N'客户Header',
'SCHEMA', N'dbo',
'TABLE', N'GlobalConfiguration',
'COLUMN', N'RateLimit_ClientIdHeader'
GO

EXEC sp_addextendedproperty
'MS_Description', N'超过限制提示语',
'SCHEMA', N'dbo',
'TABLE', N'GlobalConfiguration',
'COLUMN', N'RateLimit_QuotaExceededMessage'
GO

EXEC sp_addextendedproperty
'MS_Description', N'计数前缀',
'SCHEMA', N'dbo',
'TABLE', N'GlobalConfiguration',
'COLUMN', N'RateLimit_RateLimitCounterPrefix'
GO

EXEC sp_addextendedproperty
'MS_Description', N'包含X-Rate-Limit和Rety-After',
'SCHEMA', N'dbo',
'TABLE', N'GlobalConfiguration',
'COLUMN', N'RateLimit_DisableRateLimitHeaders'
GO

EXEC sp_addextendedproperty
'MS_Description', N'超过限制Http状态码',
'SCHEMA', N'dbo',
'TABLE', N'GlobalConfiguration',
'COLUMN', N'RateLimit_HttpStatusCode'
GO

EXEC sp_addextendedproperty
'MS_Description', N'Http协议（http,https）',
'SCHEMA', N'dbo',
'TABLE', N'GlobalConfiguration',
'COLUMN', N'ServiceDiscovery_Scheme'
GO

EXEC sp_addextendedproperty
'MS_Description', N' ',
'SCHEMA', N'dbo',
'TABLE', N'GlobalConfiguration',
'COLUMN', N'ServiceDiscovery_Host'
GO

EXEC sp_addextendedproperty
'MS_Description', N' ',
'SCHEMA', N'dbo',
'TABLE', N'GlobalConfiguration',
'COLUMN', N'ServiceDiscovery_Port'
GO

EXEC sp_addextendedproperty
'MS_Description', N' ',
'SCHEMA', N'dbo',
'TABLE', N'GlobalConfiguration',
'COLUMN', N'ServiceDiscovery_Type'
GO

EXEC sp_addextendedproperty
'MS_Description', N' ',
'SCHEMA', N'dbo',
'TABLE', N'GlobalConfiguration',
'COLUMN', N'ServiceDiscovery_Token'
GO

EXEC sp_addextendedproperty
'MS_Description', N'配置key',
'SCHEMA', N'dbo',
'TABLE', N'GlobalConfiguration',
'COLUMN', N'ServiceDiscovery_ConfigurationKey'
GO

EXEC sp_addextendedproperty
'MS_Description', N'轮询间隔',
'SCHEMA', N'dbo',
'TABLE', N'GlobalConfiguration',
'COLUMN', N'ServiceDiscovery_PollingInterval'
GO

EXEC sp_addextendedproperty
'MS_Description', N'命名空间',
'SCHEMA', N'dbo',
'TABLE', N'GlobalConfiguration',
'COLUMN', N'ServiceDiscovery_Namespace'
GO

EXEC sp_addextendedproperty
'MS_Description', N'服务发现开启',
'SCHEMA', N'dbo',
'TABLE', N'GlobalConfiguration',
'COLUMN', N'ServiceDiscoveryEnabled'
GO

EXEC sp_addextendedproperty
'MS_Description', N'配置启动',
'SCHEMA', N'dbo',
'TABLE', N'GlobalConfiguration',
'COLUMN', N'Enabled'
GO

EXEC sp_addextendedproperty
'MS_Description', N'全局配置表',
'SCHEMA', N'dbo',
'TABLE', N'GlobalConfiguration'
GO


-- ----------------------------
-- Auto increment value for GlobalConfiguration
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[GlobalConfiguration]', RESEED, 138)
GO


-- ----------------------------
-- Primary Key structure for table GlobalConfiguration
-- ----------------------------
ALTER TABLE [dbo].[GlobalConfiguration] ADD CONSTRAINT [PK__GlobalCo__3214EC0780A437B5] PRIMARY KEY CLUSTERED ([Id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO

